@model MvcCms.Web.ViewModels.HomeModel
<div class="comments-outerdiv">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td>
                <div class="comments-area">
                    <div>                    
                    <div class="mvccmsnotify">
                        <strong>Comments</strong>
                        <img class="ajaximage" title="refresh comments" src="/content/images/refresh.png" onclick="GetComments(@Model._ContentPage.ContentPageID)"
                            alt="refreshcmnts" />
                            <div id="isloading" class="isloading">
                            </div>
                    </div>
                    </div>
                    @Html.Partial("ControlsCMS/CommentItems")
                    <input type="hidden" id="ContentPageID" name="ContentPageID" value="@Model._ContentPage.ContentPageID" />
                    <input type="hidden" id="commentId" name="commentId" value="" />
                </div>
                <div>
                    @if (Context.User.Identity.IsAuthenticated == false && Model._ContentPage.AnonCommentsEnabled)
                    {
                        <label for="name">
                            Name</label>
                        @Html.TextBox("AddedByAnonName", null, new { @maxlength = 256 })
                        <label for="email">
                            E-Mail</label>
                        @Html.TextBox("AddedByAnonEmail", null, new { @maxlength = 256 })
                        <span class="xxsmall">(gravatar only)</span>
                    }
                    @if (Context.User.Identity.IsAuthenticated == true && (Model._ContentPage.AnonCommentsEnabled || Model._ContentPage.CommentsEnabled))
                    {
                        Html.Hidden("AddedByAnonEmail", "LoggedIn");
                        Html.Hidden("AddedByAnonName", ViewData["userguid"]);
                    }
                    @if ((Context.User.Identity.IsAuthenticated == true && Model._ContentPage.CommentsEnabled) || Model._ContentPage.AnonCommentsEnabled)
                    {
                        //if comments are enabled and the user is logged in or anon comments are enabled
                        <label for="body">
                            Your Comment</label>
                        <div>
                            <textarea id="body" class="commentbox"></textarea></div>
                        <div>
                            <button type="submit" id="comment-create-button" onclick="javascript: CreateComment()">
                                Add Comment</button></div>
                        <div id="saveStatus">
                        </div>                            
                    }
                    else
                    {
                        if (Context.User.Identity.IsAuthenticated == false && Model._ContentPage.CommentsEnabled)
                        {
                        <h6>
                            You must be @Html.ActionLink("Loged On", "LogOn", "Account") to make a comment.</h6>
                        }
                    }
                </div>
            </td>
        </tr>
    </table>
</div>
<div id="comment-editPH" class="jqmDialog">
    <div class="jqmdTL">
        <div class="jqmdTR">
            <div class="jqmdTC jqDrag">
                Edit Comment</div>
        </div>
    </div>
    <div class="jqmdBL">
        <div class="jqmdBR">
            <div class="jqmdBC">
                <div class="jqmdMSG">
                    <div class="jqmAlertContent">
                        <p>
                            Please wait...
                            <img src="/content/images/busy.gif" alt="loading" /></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <input type="image" src="/content/modal/dialog/close.gif" class="jqmdX jqmClose" />
</div>
<div id="comment-replyPH" class="jqmDialog">
    <div class="jqmdTL">
        <div class="jqmdTR">
            <div class="jqmdTC jqDrag">
                Reply To Comment</div>
        </div>
    </div>
    <div class="jqmdBL">
        <div class="jqmdBR">
            <div class="jqmdBC">
                <div class="jqmdMSG">
                    <div class="jqmAlertContent">
                        <p>
                            Please wait...
                            <img src="/content/images/busy.gif" alt="loading" /></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <input type="image" src="/content/modal/dialog/close.gif" class="jqmdX jqmClose" />
</div>
